<template>
	<view>
		<uni-icons :type="config.type" :color="activeStatus" :size="config.size"></uni-icons>
	</view>
</template>

<script>
	export default {
		name: "fav-like",
		props: {
			active: {
				type: Boolean,
				default: function() {
					return false
				}
			},
			config: {
				type: Object,
				default: function() {
					return {
						type: "heart-filled",
						defaultColor: "#808080",
						activeColor: "#dd524d",
						size: 30
					}
				}
			},
		},
		computed: {
			activeStatus() {
				if (this.active) {
					return this.config.activeColor
				} else {
					return this.config.defaultColor
				}
			}
		},

		data: function() {
			return {

			};
		}
		// },
	}
</script>

<style>

</style>